function [pi] = profit_Ts(pi_g,pi_b,m,mu,p_g,p_b,lambda,sigma)

    p=mu*p_g+(1-mu)*p_b;
    np=1-p;
    if (p>0 && p<1)
    gamma_g=mu*p_g/p;
    gamma_b=mu*(1-p_g)/np;
    else
        gamma_g=mu;
        gamma_b=mu;
    end
    pi=-1*(mu*p_g*(pi_g+m)+(1-mu)*p_b*(pi_b+m)-lambda*TsallisCost(mu,p,gamma_g,gamma_b,sigma));